﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AxImgeditLibCtl;
using AxScanLibCtl;

namespace ImagingScan
{
    public partial class GetSettings : Form
    {
        public GetSettings()
        {
            InitializeComponent();
            var sett = new ScanningSettings();// ScanningCtrl.GetSettings();
            if (sett != null)
            {
                colorCheckBox.CheckState = sett.IsColor ? CheckState.Checked : CheckState.Unchecked;
                multiCheckBox.CheckState = sett.IsMultiPage ? CheckState.Checked : CheckState.Unchecked;
                showSettingsCheckBox.CheckState = sett.IsShowSelectScanner ? CheckState.Checked : CheckState.Unchecked;
            }
        }

        private void saveButton_Click(object sender, EventArgs e)
        {
            ScanningSettings ScanningSettings = new ImagingScan.ScanningSettings();

            ScanningSettings.IsColor = colorCheckBox.Checked;
            ScanningSettings.IsMultiPage = multiCheckBox.Checked;
            ScanningSettings.IsShowSelectScanner = showSettingsCheckBox.Checked;

            this.DialogResult = DialogResult.OK;
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }
    }
}
